

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit Followup</title>
    </head>
    <body>
        <div class="navsub">
           <span class="menuButton"><g:link class="create" action="create">New Followup</g:link></span>
        </div>
        <div class="body">
            <h1>Edit Followup</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${followupInstance}">
            <div class="errors">
                <g:renderErrors bean="${followupInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${followupInstance?.id}" />
                <input type="hidden" name="version" value="${followupInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="interviewDate">Interview Date:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'interviewDate','errors')}">
                                    <g:datePicker name="interviewDate" value="${followupInstance?.interviewDate}" precision="minute" noSelection="['':'']"></g:datePicker>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recievedDate">Recieved Date:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'recievedDate','errors')}">
                                    <g:datePicker name="recievedDate" value="${followupInstance?.recievedDate}" precision="minute" noSelection="['':'']"></g:datePicker>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="notes">Notes:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'notes','errors')}">
                                    <textarea rows="5" cols="40" name="notes">${fieldValue(bean:followupInstance, field:'notes')}</textarea>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="referer">Referer:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'referer','errors')}">
                                    <textarea rows="5" cols="40" name="referer">${fieldValue(bean:followupInstance, field:'referer')}</textarea>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="status">Status:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'status','errors')}">
                                    <input type="text" maxlength="10" id="status" name="status" value="${fieldValue(bean:followupInstance,field:'status')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="poste">Poste:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'poste','errors')}">
                                    <textarea rows="5" cols="40" name="poste">${fieldValue(bean:followupInstance, field:'poste')}</textarea>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recrutee">Recrutee:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'recrutee','errors')}">
                                    <g:select optionKey="id" from="${Recrutee.list()}" name="recrutee.id" value="${followupInstance?.recrutee?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recruter">Recruter:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'recruter','errors')}">
                                    <g:select optionKey="id" from="${User.list()}" name="recruter.id" value="${followupInstance?.recruter?.id}" noSelection="['null':'']"></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="refererInformed">Referer Informed:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'refererInformed','errors')}">
                                    <g:checkBox name="refererInformed" value="${followupInstance?.refererInformed}" ></g:checkBox>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="recruteeReferences">Recrutee References:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:followupInstance,field:'recruteeReferences','errors')}">
                                    
<ul>
<g:each var="r" in="${followupInstance?.recruteeReferences?}">
    <li><g:link controller="recruteeReference" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="recruteeReference" params="['followup.id':followupInstance?.id]" action="create">Add RecruteeReference</g:link>

                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
